import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

// 引入 Antd UI框架
import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.css";

// 引入 echarts
import ECharts from 'vue-echarts';
import { use } from "echarts/core";

import {
    CanvasRenderer
} from 'echarts/renderers';
import {
    BarChart,
    PieChart
} from 'echarts/charts';
import {
    GridComponent,
    TooltipComponent,
    TitleComponent,
    LegendComponent,
} from 'echarts/components';

use([
    CanvasRenderer,
    BarChart,
    GridComponent,
    TooltipComponent,
    PieChart,
    TitleComponent,
    LegendComponent,
]);


const app = createApp(App);
app.config.productionTip = false;

app.use(store);
app.use(router);
app.use(Antd);

// 全局注册组件（也可以使用局部注册）
app.component("v-chart", ECharts)

app.mount("#app");
